package com.aivin.service;

import com.aivin.entity.*;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * * 业务接口:站在"使用者"角度设计接口
 * 三个方面:方法定义粒度,参数,返回类型(return 类型/异常)
 */
public interface PicService {

    /**
     * 查询所有的图片信息
     * @return
     */
    public List<TbPic> getAllPicByUserId(int userId ,int offset  , int limit  );

    public List<TbPic> getAllPicFy(int offset  , int limit  );

    /**搜索 .  根据关键字  和userName*/
    public PicAndUserGroupBean getResultBydKeyWorldFy(String  keyWord , int offset  , int  limit);


    public int getPicRecodeSize(String keyWord);
    public int getUserRecodeSize(String keyWord);

    public int getAllPicSizeByUserId(int userId);
    public int getPiclikeCountByPicId (@PathVariable int picId    );
    public int getiiclikedStateByPicIdAndUserId (@PathVariable int picId  ,@PathVariable int userId    );

    public int getPicLikedStateByUser(@PathVariable int picId   ,@PathVariable int userId  );

    public int setPicLikedStateByUser(@PathVariable int likestate ,@PathVariable int picId   ,@PathVariable int userId  );

    public int  publishPic (@PathVariable  TbPic picBean  );

    public int   addPicLikedStateByUserId(@PathVariable PiclikedBean bean) ;

    /**get some picInfo recoomend by system**/
    public List<RecommendInfoBean> getRecommendPics(  );

    /**用户点赞列表、用户图片收藏列表**/
    public List<PiclikedtableBean> queryPicLikedListByUserId( int userId , int offset , int limit );

    /**根据图片id获取图片信息**/
    public TbPic queryPicInfoByPicId(int picId);


}
